<?php 
//$reqtrack->afficheArray($status); 
//print_r($current_status);
?>

<div class="requirements form">
<?php echo $form->create('Requirement');?>
	<fieldset>
 		<legend><?php __('Modifier requirement');?></legend>
	<?php
//		echo $form->input('r_index');
//		echo $form->input('r_reference');
//		echo $form->input('r_title');
//		echo $form->input('r_description');
//		echo $form->input('r_category');
//		echo $form->input('r_applicability');
//		echo $form->input('r_conformance');
//		echo $form->input('r_notes');
//		echo $form->input('r_project');
		echo $form->input('r_reference', array( 'label' => 'Référence :'));
		echo $form->input('r_title', array('label' => 'Titre :'));
		echo $form->input('r_description', array( 'label' => 'Description :', 'rows' => 4));
		
		echo "<div class=\"input text\">" ;
		echo "<label for=\"RequirementRCategory\">Categorie :</label>" ;
		echo $form->select('r_category', $categories, null, null, false);
		
		echo "<label for=\"RequirementRApplicability\">Applicabilité :</label>" ;
		echo $form->select('r_applicability', $applicabilities, null, null, false);
		
		echo "<label for=\"RequirementRConformance\">Conformité :</label>" ;
		echo $form->select('r_conformance', $conformances, null, null, false);
		
		echo "<label for=\"RequirementRStatus\">Statut :</label>" ;
		echo $form->select('r_status', array('nouveau' => 'nouveau', 'accepté' => 'accepté', 'à clarifier' => 'à clarifier', 'rejeté' => 'rejeté'), null, null, false);
//		echo $form->select('r_status', $status, null, null, false);
		//array('nouveau' => 'nouveau', 'accepté' => 'accepté', 'à clarifier' => 'à clarifier', 'Rejeté' => 'Rejeté')
		
		echo "<label for=\"RequirementRProject\">Projet :</label>" ;
		echo $form->select('r_project', $projects, null, null, false);
		echo "</div>";

		echo $form->input('r_notes', array( 'label' => 'Notes :', 'rows' => 2));
	?>
	
<?php echo $form->end('Modifier');?>
	</fieldset>
</div>
<div class="actions">
	<ul>
		<li><?php echo $html->link('<img src="/ReqTrack/img/Supprimer.png" alt="Supprimer" title="Supprimer">', array('action'=>'delete', $form->value('Requirement.r_index')), null, sprintf(__('Are you sure you want to delete # %s?', true), $form->value('Requirement.r_index')), null, null, false); ?></li>
		<li><?php echo $html->link(__('Gérer '.$this->name, true), array('action'=>'index')); ?> </li>
		<li><?php echo $html->link(__('Ajouter '.$this->name, true), array('action'=>'add')); ?> </li>
		<li><?php echo $html->link(__('Autres actions', true), array('controller'=> 'summaries', 'action'=>'index')); ?> </li>
	</ul>
</div>
